package biz.ezcom.design.pattern.composite;

/**
 * 不能包含子元素的组件 
 */
public class Leaf extends Composite{
	public Leaf(int level, String name){
		super(level, name);
	}
	@Override
	public void add(Composite composite) {
		System.out.println("叶子节点add空实现");
	}

	@Override
	public void remove(Composite composite) {
		System.out.println("叶子节点remove空实现");		
	}

	@Override
	public void show() {
		for(int i=0 ; i<getLevel() ; i++){
			System.out.print("\t");
		}
		System.out.println(getName());
	}

}
